import 'package:equatable/equatable.dart';
import 'package:backend.purchases/domain/entities/app_store_api/app_store_api_environment.dart';
import 'package:backend.purchases/domain/entities/app_store_api/app_store_api_purchased_subscription_expiration_reason.dart';
import 'package:backend.purchases/domain/entities/app_store_api/app_store_api_purchased_subscription_price_increase_status.dart';

class AppStoreApiPurchasedSubscriptionRenewalInfo extends Equatable {
  const AppStoreApiPurchasedSubscriptionRenewalInfo({
    required this.purchaseItemSku,
    required this.originalTransactionId,
    required this.autoRenewalEnabled,
    required this.isInBillingRetryPeriod,
    required this.priceIncreaseStatus,
    required this.environment,
    required this.expirationReason,
    required this.gracePeriodExpirationTime,
  });

  final String purchaseItemSku;
  final String originalTransactionId;
  final bool autoRenewalEnabled;
  final bool isInBillingRetryPeriod;
  final AppStoreApiPurchasedSubscriptionPriceIncreaseStatus priceIncreaseStatus;
  final AppStoreApiEnvironment environment;
  final AppStoreApiPurchasedSubscriptionExpirationReason? expirationReason;
  final DateTime? gracePeriodExpirationTime;

  @override
  List<Object?> get props {
    return [
      purchaseItemSku,
      originalTransactionId,
      autoRenewalEnabled,
      isInBillingRetryPeriod,
      priceIncreaseStatus,
      environment,
      expirationReason,
      gracePeriodExpirationTime,
    ];
  }
}
